package com.systop.supervise.mapper;

import com.systop.common.pojo.elective_course;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;
import java.util.List;

@Component
@Mapper
public interface elective_courseServiceMapper {
    @Select("select * from elective_course")
    List<elective_course> elcourall();

    @Delete("delete from elective_course where elective_course_id=#{elective_course_id}")
    int elcourdel(Integer elective_course_id);

    @Insert("insert into elective_course (course_id,tno,college_name,restricted_grade,time,know,place,max_number,min_number,current_number,remark) values (#{course_id},#{tno},#{college_name},#{restricted_grade},#{time},#{know},#{place},#{max_number},#{min_number},#{current_number},#{remark})")
    int eelcouradd(elective_course electivecourse);

    @Update("update elective_course set course_id=#{course_id},tno=#{tno},college_name=#{college_name},restricted_grade=#{restricted_grade},time=#{time},know=#{know},place=#{place},max_number=#{max_number},current_number=#{current_number},remark=#{remark}where elective_course_id = #{elective_course_id}")
    int elcourpdate(elective_course electivecourse);

    @Select("select * from elective_course where elective_course_id=#{elective_course_id}")
    elective_course elcourid(Integer elective_course_id);

    @Select("select * from elective_course where tno=#{tno}")
    List<elective_course> elcourtno(String tno);

    @Select("select * from elective_course where elective_course_id=#{elective_course_id}")
    List<elective_course> elcourid1(Integer elective_course_id);

}
